// @ts-expect-error 防止报错 统一管理咱们项目用户相关的接口
import request from '@/utils/request'

//项目用户相关的请求地址

enum API {
    LOGIN_URL = '/user/login',
    GET_USER_INFO = '/user/getInfo',
    LOGOUT = '/user/logout',
}
// //登录接口
// export const reqLogin = (data: loginFormData) =>
//     request.post<any, loginResponseData>(API.LOGIN_URL, data);

// 登录接口
export const login = (data: any) => request.post<any, any>(API.LOGIN_URL, data)

// 查询用户信息
export const getUserInfo = () => request.get<any, any>(API.GET_USER_INFO)

// 退出登录
export const logout = () => request.get<any, any>(API.LOGOUT)
